package com.lyl.servicelive.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lyl.servicelive.entity.CourseDescription;
import com.lyl.servicelive.mapper.CourseDescriptionMapper;
import com.lyl.servicelive.service.CourseDescriptionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程简介 服务实现类
 * </p>
 *
 * @author 雷艳玲
 * @since 2022-07-05
 */
@Service
public class CourseDescriptionServiceImpl extends ServiceImpl<CourseDescriptionMapper, CourseDescription> implements CourseDescriptionService {

    @Override
    public CourseDescription getLiveCourseById(Long id) {
        QueryWrapper<CourseDescription> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("live_course_id", id);
        return baseMapper.selectOne(queryWrapper);
    }
}
